import Vue from 'vue'
import Router from 'vue-router'
import index from "../views/index.vue"
import corporate from "../views/corporate.vue"
import contact from "../views/contact.vue"
import about from "../views/about.vue"
import product from "../views/product.vue"
import software from "../views/software.vue"
import productDetailInfo from "../views/productDetailInfo.vue"
Vue.use(Router)
const router = new Router({
  base: '/',
  mode: 'history', // 使用history模式
  scrollBehavior: () => ({ y: 0 }),
  routes:
    [
      
      {
        path: '/',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets'
      },
      {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [
          {
            path: '/corporate',
            name: '主页',
            component: corporate,
            iconCls: 'el-icon-tickets'
          },
          {
          path: '/corporate',
          name: '主页',
          component: corporate,
          iconCls: 'el-icon-tickets'
        },
        {
          path: '/about',
          name: '关于',
          component: about,
          iconCls: 'el-icon-tickets'
        }
          ,
        {
          path: '/product',
          name: '产品列表',
          component: product,
          iconCls: 'el-icon-tickets'

        }
        ,
        {
          path: '/productDetailInfo',
          name: '详情',
          component: productDetailInfo,
          iconCls: 'el-icon-tickets'

        }
        
          ,
        {
          path: '/software',
          name: '软件列表',
          component: software,
          iconCls: 'el-icon-tickets'

        }
          ,
        {
          path: '/contact',
          name: '联系我们',
          component: contact,
          iconCls: 'el-icon-tickets'
        }


        ]
      },
      {
        path: '/',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets'
      }
    ]
})
router.beforeEach((to, from, next) => {
  next();
})

router.afterEach(() => {
})
export default router;
